<script type="text/javascript">
    $(document).ready(function() {
        $("#content_checkAll").click(function() {
            if ($(this).attr("checked") == "checked") {
                $(":checkbox").attr("checked", true);
            } else {
                $(":checkbox").attr("checked", false);
            }
        });

    });
</script> 
<legend>
    <h4>
        <?php
        echo $control->getAjaxLink(array('name' => '功能列表', 'id' => 'showEventList'), array(
            'cooker' => 'BAEvent@showEventList'
        ));
        ?>\
        <?php
        echo $control->getAjaxLink(array('name' => '活动列表', 'id' => 'ShowActivityList'), array(
            'cooker' => 'BWCompanyInfo@ShowActivityList',
            'eventId' => $eventId,
        ));
        ?>\ 
        <?php echo '内容列表'; ?>
    </h4>
</legend>
<fieldset>
    <table class="table table-hover">
        <thead>
            <tr>
                <th><input type="checkbox" name="content_checkAll" id="content_checkAll"></th>
                <th>内容标题</th>
                <th>作者</th>
                <th>操作</th>
            </tr> 
        </thead>
        <tbody>
            <?php
            foreach ($contentView as $id => $list) {
                ?>
                <tr>
                    <td><label class="checkbox">
                            <input type="checkbox" name="subBox[]" value="<?php echo $id; ?>"> 
                        </label></td>
                    <td> <?php echo $list->getItem('name')->getValue(); ?> </td>
                    <td> <?php echo $list->getItem('author')->getValue(); ?> </td>
                    <td>
                        <div class="row-fluid">
                            <?php
                            echo $control->getAjaxLink(array('name' => '修改', 'id' => 'ModifyCompanyContent'), array(
                                'cooker' => 'BWCompanyInfo@ShowAddCompanyContent',
                                'activityId' => $activityId,
                                 'eventId'=>$eventId,
                                'contentId'=>$id,
                            ));
                            echo ' | ';
                            echo $control->getAjaxLink(array('name' => '删除', 'id' => 'DelCompanyContent'), array(
                                'cooker' => 'BWCompanyInfo@DelCompanyContent',
                                'activityId' => $activityId,
                                 'eventId'=>$eventId,
                                'contentId'=>$id,
                            ));
                            ?>
                        </div>                   
                    </td>
                </tr>
    <?php }
?>
        </tbody>
    </table>
<div class="row-fluid">
    <?php
       echo $control->getAjaxLink(array('name' => '添加内容', 'id' => 'ShowAddCompanyContent'), array(
           'cooker' => 'BWCompanyInfo@ShowAddCompanyContent',
           'activityId' => $activityId,
           'htmlOptions' => array('class' => 'btn'),
           'eventId'=>$eventId,
       ));
    ?>
</div>